import Cookie from 'js-cookie'

const state = {
  nav: 'ROOM INFO'
};

const mutations = {
  SET_NAV: (state, nav) => {
    state.nav = nav;
  },
};

const actions = {
  setNav({ commit }, nav) {
    commit('SET_NAV', nav);
    Cookie.set('nav', JSON.stringify(state));
  }
};

export default {
  namespaced: true,
  state,
  mutations,
  actions
}